const path = require("path")
const fs = require("fs")

const recommendListPath = path.resolve(__dirname, "../../cache/recommendList.json")

module.exports = async () => {
    let result = []

    result = JSON.parse(fs.readFileSync(recommendListPath, { encoding: "utf-8" }))
    result = result.sort((n1, n2) => {
        return n1.calculate.kd.k.at(-1) - n2.calculate.kd.k.at(-1)
    })
    return result

}
